package com.yb.livewykt.bean

class MakeupEntity(var bundlePath:String,var itemHandle:Int,var isNeedFlipPoints:Boolean) {

    constructor(bundlePath: String):this(bundlePath,0,false)

    constructor(makeupEntity: MakeupEntity):this(makeupEntity.bundlePath,makeupEntity.itemHandle,makeupEntity.isNeedFlipPoints)

    override fun equals(other: Any?): Boolean {
        if (this == other) return true
        if (other == null || javaClass != other::javaClass) return false
        val that = other as MakeupEntity
        if (isNeedFlipPoints != that.isNeedFlipPoints) return false
        if (bundlePath != null) return bundlePath == that.bundlePath else return that.bundlePath == null
    }

    override fun hashCode(): Int {
        var result:Int = 0
        if (bundlePath != null) result = bundlePath.hashCode()
        result = result * 31 + ( if (isNeedFlipPoints) 1 else 0)
        return result
    }

    override fun toString(): String {
        return "MakeupEntity(bundlePath='$bundlePath', itemHandle=$itemHandle, isNeedFlipPoints=$isNeedFlipPoints)"
    }


}